package com.neusoft.controller.physician;

import com.neusoft.service.CheckRequestService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;


@Api(tags = {"检查申请提交"})
@RestController
@RequestMapping("/checkrequests")
//@CrossOrigin
public class CheckRequestController2 {

    @Autowired
    private CheckRequestService checkRequestService;

    @ApiOperation(value = "提交",notes = "用户测试notes")
    @PostMapping("/saveCheckRequest")
    public String saveCheckRequest(@RequestBody Map<String,Object> checkRequest){
        checkRequest.put("check_time",LocalDateTime.now());
        checkRequest.put("creation_time",LocalDateTime.now());
        return checkRequestService.saveCheckRequest(checkRequest);
    }
}
